package com.sina.finance.api.framework.permission.init.impl;

import java.util.Set;

/**
 * @File name : PerminssionService
 * @Description :
 * @Creator : cuiyong
 * @CreateTime : 15/11/11 16:47
 * @Version : 1.0
 * @Update records:
 * 1.0 15/11/11 by cuiyong: Created
 * All rights served : SINA Corporation
 */
public interface PerminssionService {

    public Set<SysPrivilege> getAllPrivilegesInRep();

    public SysRole getDefaultRole();

    SysRole createRole();

    void resetPrivilegeOfDefaultRole(Set<SysPrivilege> allPrivilegesInRep, SysRole sysRole);

    void saveRole(SysRole sysRole);

    void updateRole(Class<SysRole> sysRoleClass, SysRole sysRole);

    Set<SysPrivilege> getAllPrivilegesInProject();

    void removePrivilege(Set<SysPrivilege> toDelete);

    void savePrivilege(Set<SysPrivilege> toInsert);
}
